<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="menu_news_label1" var="menu_news_label1"/>
<c:if test="${!empty newsCatalogyToReads}">
<br>
<TABLE class=leftColumnModuleHead cellSpacing=0 cellPadding=0 
  width="100%" border=0 valign="top">
  <TBODY>
  <TR>
    <TH class="menu_title_left" width=48>&nbsp;</TH>
    <TH class="menu_title_middle">${menu_news_label1}</TH>
    <th width="48" align="right" class="menu_title_right"></th></TR></TBODY></TABLE>
<TABLE class=subMenu cellSpacing=0 cellPadding=0 width="100%" border=0>
	<TBODY>	
	<c:set var="bulletinCount" value="0"/>
	<c:forEach items="${newsCatalogyToReads}" var="newsCatalogyToRead">
	  <TR>
	    <TD class=subMenuTDIcon 
	    style="BACKGROUND-IMAGE: url(../../themes/${sessionScope.loginUser.theme}/images/createBg.gif); BACKGROUND-REPEAT: repeat-y" 
	    width=16><A class=subMenuLink 
	      onmouseover="document.getElementById('submenu_newsCatalogy${newsCatalogyToRead.id}').style.background='#f2f4fb';" 
	      onmouseout="document.getElementById('submenu_newsCatalogy${newsCatalogyToRead.id}').style.background='#ffffff';" 
	      href="news.do?method=list&cid=${newsCatalogyToRead.id}"><IMG 
	      height=16 alt="${newsCatalogyToRead.name}" 
	      src="../../themes/${sessionScope.loginUser.theme}/images/news_sort.gif" 
	      width=16 align=absMiddle border=0></A></TD>
	    <TD class=subMenuTD id=submenu_newsCatalogy${newsCatalogyToRead.id} 
	    onmouseover="this.style.background='#f2f4fb';this.style.cursor='hand';" 
	    onmouseout="this.style.background='#ffffff';this.style.cursor='auto';" 
	    noWrap>&nbsp;<A class=subMenuLink 
	      href="<c:url value="/modules/news/news.do?method=list&cid=${newsCatalogyToRead.id}"/>">${newsCatalogyToRead.name}</A></TD></TR>	
	</c:forEach>
	</TBODY>
</TABLE>
</c:if>
<script>

jQuery(function(){
     <c:if test="${cookie.news_toggle.value=='hide'|| param.method=='showIndex' || param.fromPage == 'true'}">
      hideTogole();  //如果cookie记录是收缩状态或者是进入首页，都隐藏起来
     </c:if> 
     jQuery.get('<c:url value="/modules/news/news.do?method=showCatalogyToAuditCount"/>&t='+new Date(), {test:"aaa"}, 
      function(response, textStatus){
       this;
       if(response>0)
       {
       jQuery("#submenu115").append('<span style="color:red;font-size:12">('+response+')</span>');
       }
      } );
	
});


function toggleMenu(){
  if(jQuery('#leftmenu').css('display')=='none')
		{
			showTogole();
			
		}
		else
		{		   
			hideTogole();
			
		}
}

function showTogole()
{
    jQuery('#leftmenu').show();
	jQuery('#togglebtn').attr("src","../../themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/images/toggle_bar_left.gif");
    Set_Cookie("news_toggle", 'show', false, false, false, false);
}

function hideTogole()
{
    jQuery('#leftmenu').hide();
	jQuery('#togglebtn').attr("src","../../themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/images/toggle_bar_right.gif");
	Set_Cookie("news_toggle", 'hide', false, false, false, false);
    
}
</script>
